import { Menu, Icon } from 'antd';
import Link from 'umi/link';

function Header({ location }) {
  return (
    <Menu
      selectedKeys={[location.pathname]}
      mode="horizontal"
      theme="dark"
    >
      <Menu.Item key="/">
        <Link to="/"><Icon type="home" />主页</Link>
      </Menu.Item>
      <Menu.Item key="/devices">
        <Link to="/devices"><Icon type="bars" />设备</Link>
      </Menu.Item>
      <Menu.Item key="/phones">
        <Link to="/phones"><Icon type="bars" />手机号</Link>
      </Menu.Item>
    </Menu>
  );
}

export default Header;
